package com.gz.common.mongodb.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.MongoTransactionManager;

/**
 * @ClassName MongoTransactionConfiguration
 * @Description // mongo事务配置类
 * @Author WHX
 * @Date 2021/8/12 10:40
 **/
@Configuration
public class MongoTransactionConfiguration {
    @Bean
    MongoTransactionManager mongoTransactionManager(MongoDbFactory factory){
        return new MongoTransactionManager(factory);
    }

}
